#include "Stack_Queue.h"
#include <list>

using namespace Mystd;
using std::cin;
using std::endl;
using std::cout;

void test_stack()
{
	stack<int> st1;
	st1.push(1);
	st1.push(2);
	st1.push(3);
	st1.push(4);

	cout << "st1:" << endl;
	while (!st1.empty())
	{
		cout << st1.top() << " ";
		st1.pop();
	}
	cout << endl;

	stack<int, std::list<int>> st2;
	st2.push(1);
	st2.push(2);
	st2.push(3);
	st2.push(4);

	cout << "st2:" << endl;
	while (!st2.empty())
	{
		cout << st2.top() << " ";
		st2.pop();
	}
	cout << endl;
}

void test_queue()
{
	queue<int> q1;
	q1.push(1);
	q1.push(2);
	q1.push(3);
	q1.push(4);
	q1.push(5);
	q1.push(6);

	cout << "q1:" << endl;
	while (!q1.empty())
	{
		cout << q1.front() << " ";
		q1.pop();
	}
	cout << endl;

	queue<int, std::list<int>> q2;
	q2.push(1);
	q2.push(2);
	q2.push(3);
	q2.push(4);

	cout << "q2:" << endl;
	while (!q2.empty())
	{
		cout << q2.front() << " ";
		q2.pop();
	}
	cout << endl;
}

int main()
{
	test_stack();
	test_queue();

	return 0;
}